package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserDetailMapper;
import com.ruoyi.system.domain.UserDetail;
import com.ruoyi.system.service.IUserDetailService;

/**
 * 用户细节表增删改查Service业务层处理
 * 
 * @author hyb
 * @date 2023-03-03
 */
@Service
public class UserDetailServiceImpl implements IUserDetailService 
{
    @Autowired
    private UserDetailMapper userDetailMapper;

    /**
     * 查询用户细节表增删改查
     * 
     * @param id 用户细节表增删改查主键
     * @return 用户细节表增删改查
     */
    @Override
    public UserDetail selectUserDetailById(Long id)
    {
        return userDetailMapper.selectUserDetailById(id);
    }

    /**
     * 查询用户细节表增删改查列表
     * 
     * @param userDetail 用户细节表增删改查
     * @return 用户细节表增删改查
     */
    @Override
    public List<UserDetail> selectUserDetailList(UserDetail userDetail)
    {
        return userDetailMapper.selectUserDetailList(userDetail);
    }

    /**
     * 新增用户细节表增删改查
     * 
     * @param userDetail 用户细节表增删改查
     * @return 结果
     */
    @Override
    public int insertUserDetail(UserDetail userDetail)
    {
        return userDetailMapper.insertUserDetail(userDetail);
    }

    /**
     * 修改用户细节表增删改查
     * 
     * @param userDetail 用户细节表增删改查
     * @return 结果
     */
    @Override
    public int updateUserDetail(UserDetail userDetail)
    {
        return userDetailMapper.updateUserDetail(userDetail);
    }

    /**
     * 批量删除用户细节表增删改查
     * 
     * @param ids 需要删除的用户细节表增删改查主键
     * @return 结果
     */
    @Override
    public int deleteUserDetailByIds(Long[] ids)
    {
        return userDetailMapper.deleteUserDetailByIds(ids);
    }

    /**
     * 删除用户细节表增删改查信息
     * 
     * @param id 用户细节表增删改查主键
     * @return 结果
     */
    @Override
    public int deleteUserDetailById(Long id)
    {
        return userDetailMapper.deleteUserDetailById(id);
    }

    @Override
    public void updateUserDetailAddCount(UserDetail userDetail) {
        userDetailMapper.updateUserDetailAddCount(userDetail);
    }

    @Override
    public void updateUserDetailByUserId(UserDetail userDetail) {
        userDetailMapper.updateUserDetailByUserId(userDetail);
    }
}
